//
//  queryDataInfo.m
//  cocoapodText
//
//  Created by apple on 16/9/9.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "queryDataInfo.h"
#import <Foundation/Foundation.h>

@implementation queryDataInfo

-(instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        //使用KVC
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

/**
 *  工厂方法
 *
 *  @param dict 字典
 *
 *  @return 模型
 */
+(instancetype)queryDataInfoWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

/**
 *  工厂方法
 *
 *  @param dict 字典
 *
 *  @return 模型
 */
+(instancetype)queryDataInfoWithItemName:(NSString *)itemName itemKWH:(NSString *)itemKWH itemCoal:(NSString *)itemCoal itemCarbon:(NSString *)itemCarbon isOdd:(NSString *)isOdd infos:(NSMutableArray *)infos{
    NSDictionary *dict = @{@"ItemName":itemName,@"ItemKWH":itemKWH,@"ItemCoal":itemCoal,@"ItemCarbon":itemCarbon,@"ItemCarbon":itemCarbon,@"IsOdd":isOdd,@"Infos":infos};
    return [[self alloc]initWithDict:dict];
}

@end
